/*    */ package cc.s2m.web.s2mBlog.controller.admin;
/*    */ 
/*    */ import cc.s2m.web.s2mBlog.controller.base.BaseController;
/*    */ import cc.s2m.web.s2mBlog.pojo.SysTaskHandel;
/*    */ import cc.s2m.web.s2mBlog.service.ISysTaskHandel;
/*    */ import java.util.List;
/*    */ import javax.servlet.http.HttpServletRequest;
/*    */ import javax.servlet.http.HttpServletResponse;
/*    */ import org.springframework.beans.factory.annotation.Autowired;
/*    */ import org.springframework.stereotype.Controller;
/*    */ import org.springframework.ui.Model;
/*    */ import org.springframework.web.bind.annotation.RequestMapping;
/*    */ import org.springframework.web.bind.annotation.RequestParam;
/*    */ import org.springframework.web.bind.annotation.ResponseBody;
/*    */ 
/*    */ @Controller("admin_SysTaskHandelController")
/*    */ @RequestMapping({"/admin/sysTaskHandel"})
/*    */ public class SysTaskHandelController extends BaseController
/*    */ {
/*    */ 
/*    */   @Autowired
/*    */   private ISysTaskHandel sysTaskHandelService;
/*    */ 
/*    */   @RequestMapping(value={"/list"}, method={org.springframework.web.bind.annotation.RequestMethod.GET})
/*    */   public String list(Model model)
/*    */   {
/* 30 */     List list = this.sysTaskHandelService.getList(new SysTaskHandel(), null);
/* 31 */     model.addAttribute("list", list);
/*    */ 
/* 33 */     return "admin/sysTaskHandel";
/*    */   }
/*    */ 
/*    */   @RequestMapping(value={"/del"}, method={org.springframework.web.bind.annotation.RequestMethod.POST})
/*    */   @ResponseBody
/*    */   public String del(HttpServletRequest request, HttpServletResponse response, @RequestParam(required=false) Integer id)
/*    */   {
/* 41 */     SysTaskHandel bean = (SysTaskHandel)this.sysTaskHandelService.selectByPrimaryKey(id);
/* 42 */     if (bean != null) {
/* 43 */       this.sysTaskHandelService.deleteByPrimaryKey(id);
/*    */     }
/* 45 */     return "success";
/*    */   }
/*    */ 
/*    */   @RequestMapping(value={"/enable"}, method={org.springframework.web.bind.annotation.RequestMethod.POST})
/*    */   @ResponseBody
/*    */   public String enable(HttpServletRequest request, HttpServletResponse response, @RequestParam(required=false) Integer id)
/*    */   {
/* 53 */     SysTaskHandel bean = (SysTaskHandel)this.sysTaskHandelService.selectByPrimaryKey(id);
/* 54 */     if (bean != null) {
/* 55 */       bean.setIsEnabled(Boolean.valueOf(!bean.getIsEnabled().booleanValue()));
/* 56 */       this.sysTaskHandelService.updateByPrimaryKey(bean);
/*    */     }
/* 58 */     return "success";
/*    */   }
/*    */ }

/* Location:           C:\Users\Administrator\Desktop\s2mBlog.zip
 * Qualified Name:     s2mBlog-3.0.0.WEB-INF.classes.cc.s2m.web.s2mBlog.controller.admin.SysTaskHandelController
 * JD-Core Version:    0.6.1
 */